package cn.push.embed.core.http;


import http.com.zhy.http.okhttp.OkHttpUtils;
import http.com.zhy.http.okhttp.callback.Callback;
import http.com.zhy.http.okhttp.callback.StringCallback;

import java.util.Map;

/**
 * Created by shangdongzhou on 2017/3/27.
 */

public class HttpBaseModel {

    /**
     * 普通get请求
     * @param url　
     * @param params
     * @param stringCallback
     */
    public static void get(String url, Map<String,String> params,StringCallback stringCallback){
        OkHttpUtils
                .get()
                .url(url)
                .params(params)
                .build()
                .execute(stringCallback);
    }

    public static void post(String url, Map<String,String> params, Callback callback){
        OkHttpUtils
                .post()
                .url(url)
                .params(params)
                .build()
                .execute(callback);
    }













}
